getaddrinfo-is-threadsafe
authorDebian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>
Sat, 2 Feb 2019 18:30:10 +0000 (18:30 +0000)
committerRyan Tandy <ryan@nardis.ca>
Sat, 2 Feb 2019 18:30:10 +0000 (18:30 +0000)
commita7720d3b26ea38e1fe4200e1ffa4a4f0350c80ae
tree96ac85a5dc8ec352c2e38a7165784581fc15a310
parentc7ce341fa5ce5cd61ee731a3fa864a026cc6be19
getaddrinfo-is-threadsafe

OpenLDAP upstream conservatively assumes that certain resolver functions
(getaddrinfo, getnameinfo, res_query, dn_expand) are not re-entrant; but we
know that the glibc implementations of these functions are thread-safe, so
we should bypass the use of this mutex.  This fixes a locking problem when
an application uses libldap and libnss-ldap is also used for hosts
resolution.

Closes Debian bug #340601.

Not suitable for forwarding upstream; might be made suitable by adding a
configure-time check for glibc and disabling the mutex only on known
thread-safe implementations.

Gbp-Pq: Name getaddrinfo-is-threadsafe
libraries/libldap/os-ip.c
libraries/libldap/util-int.c